<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="../css/bootstrap.min.css" rel="stylesheet">
<link href="../css/bootstrap-table.css" rel="stylesheet">
<!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap-table.js"></script>
<script src="../js/bootstrap-table-zh-CN.js"></script>
<link rel="stylesheet" href="../public/layui/css/layui.css"  media="all">
	<script src="../public/layui/layui.js" charset="utf-8"></script>
	<style>
		.layui-table,.layui-table-view{
			margin: 0 0px;
		}
	</style>

	
</head>
<body>

	<!-- 表单 -->
	<% if(session.getAttribute("user")==null){%>
		<script>
		location.href = "../loginUser.html";
	</script>
	<%
	}
	%>

	<table  class="layui-hide" id="cardTable" lay-filter="formFilter"></table>
	

	


	<script> 
	layui.use(['table','jquery'], function(){
	  $ = layui.jquery;
	  var table = layui.table;
	  // 进行渲染
	  var tableIns =  table.render({
	    elem: '#cardTable'
	    ,url:'./myexpressorder'
		,title: '数据表单'
		,page: true
	    ,cols: [[
				{field:'oid', width:180, title: '订单号', sort: true}
	      ,{field:'nowarea', width:180, title: '当前地点', sort: true}
		  ,{field:'des',    width:180  ,title: '目的地', sort: true}
		  ,{field:'time', title: '时间', width: 250, sort: true}
	      ,{field:'state', width:250, title: '当前状态', sort: true}
	      ,{field:'rid', width:250, title: '收件人', sort: true}

	    ]]
	    ,page: true
	  });
		table.on('edit(form)', function(obj){ //注：edit是固定事件名，test是table原始容器的属性 lay-filter="对应的值"
			console.log(obj.value); //得到修改后的值
			console.log(obj.field); //当前编辑的字段名
			console.log(obj.data); //所在行的所有相关数据
		});
	});
	</script>
</body>
</html>